package com.neusoft.yiyang.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

/**
 * AuthService 应用启动类
 */
@SpringBootApplication
@EnableDiscoveryClient  // 启用服务发现客户端，支持 Nacos 或其他注册中心
@EnableFeignClients(basePackages = "com.neusoft.yiyang.auth.client") // 仅扫描 auth-service 的 client 包
@ComponentScan(basePackages = "com.neusoft.yiyang")  // 扫描项目包
@RefreshScope  // 支持配置的动态刷新
public class AuthServiceApplication {

    public static void main(String[] args) {
        // 启动 Spring Boot 应用
        SpringApplication.run(AuthServiceApplication.class, args);
    }
}
